package com.cy.pj.goods.service;

import com.cy.pj.goods.dao.GoodsDao;
import com.cy.pj.goods.pojo.Goods;
import com.sun.rowset.internal.Row;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GoodsDaoServiceImpl implements GoodsDaoService {

    @Autowired
    GoodsDao goodsDao;

    @Override
    public List<Goods> findGoods() {
        List<Goods> list = goodsDao.findGoods();
        return list;
    }

    @Override
    public void deleteGoodsById(Integer id) {
        goodsDao.deleteGoodsById(id);

    }

    @Override
    public void insertGoods(Goods goods) {
        goodsDao.insertGoods(goods);
    }

    @Override
    public void updateGoods(Goods goods) {
        goodsDao.updateGoods(goods);
    }

    @Override
    public List<Goods> findGoodsById(Integer id) {
        return goodsDao.findGoodsById(id);
    }
}
